import { axios, get, post, Delete, Patch } from './request'

// 项目的所有请求 包装这里

export const ajax = {

    register: (data) => post('/localhost/userWork', data), // 添加信息 

    findUser: (params) => get('/localhost/userWork', params), // 查询用户 

    setUser: (data, id) => Patch('/localhost/userWork/', data, id), //修改用户密码

    getCaptcha: (params) => get('http://47.104.209.44:3333/captcha/sent', params), // 发送验证码

    checkCaptcha: (params) => get('http://47.104.209.44:3333/captcha/verify', params), // 验证验证码

    getMZdata: (params, headers) => get('https://m.maizuo.com/gateway', params, headers), // 城市列表

    getBili: (params, headers) => get('/bili/mall-c-search/home/feed/list', params, headers), //bilibili数据get

    getNew: (params, headers) => get('/bili/mall-c-search/home/new_items/list', params, headers), //今日上新get

    postBili: (data, params, headers) => post('/bili/mall/noah/search/category/v2', data, params, headers), //bilibili数据post

    getshouban: (data, params, headers) => get('/bili/mall-c-search/home/items/top', data, params, headers), //bilibili手办get

    getType: (params, headers) => get('/move/api/ticket/banner/homeconfig', params, headers), //当前城市的活动主体get

    postswiper: (data, params, headers) => post('/bili/mall-dayu/bigshot/project/query/selected', data, params, headers), //bilibili数据post轮播图

    getZhanlan: (params, headers) => get('/move/api/ticket/project/listV2', params, headers), //今日上新get

    getAll: (data, params, headers) => get('/bili/mall-c-search/home/category/listV2', data, params, headers), //bilibili分类 数据

    addShopCar: (data, params) => post('/localhost/shopCar', data, params), // 添加商品进入购物车

    findcar: (params) => get('/localhost/shopCar', params), // json-server 查询购物车里面的商品数据 

    setCar: (data, id) => Patch('/localhost/shopCar/', data, id), //修改购物车的数据

    getShopCar: (params) => get('/localhost/shopCar', params), // 查询购车的数据 

    delShopCar: (id) => Delete('/localhost/shopCar/', id), //删除购物车数据

    addLike: (data, params) => post('/localhost/likeShop', data, params), // 添加x喜欢进点赞表

    delLike: (id) => Delete('/localhost/likeShop/', id), //删除点赞表里的数据

    findLike: (params) => get('/localhost/likeShop', params), //查询点赞表里面的数据

    savePlace: (data) => post('/localhost/palce', data), // 添加地址信息

    getPlace: (params) => get('/localhost/palce', params), //查询当前用户的所有地址


    addSocre: (data, params) => post('/localhost/score', data, params), // 添加x喜欢进点赞表

    findSocre: (params) => get('/localhost/score', params), //查询点赞表里面的数据

    addLiuyan: (data, params) => post('/localhost/liuyan', data, params), // 添加评论进留言表



















}